package com.qinglei.recoup.system.dao;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.qinglei.recoup.system.domain.Bed;
import com.qinglei.recoup.system.domain.BedStatusBO;
import com.qinglei.recoup.system.pojo.BedInformationVO;
import com.qinglei.recoup.system.pojo.event.VitalSignsAlarmDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface DeviceRealTimeDataMapper {
    List<Integer> getBedIdsBySn(@Param("sn") String sn);

    /**
     * 根据用户ID查询床位状态列表
     *
     * @param bedIds
     * @return
     */
    @SqlParser(filter = true)
    List<BedStatusBO> selectBedStatusListByIds(@Param("ids") List<Integer> ids, @Param("tenantId") Integer tenantId);

    Bed getBedBySn(@Param("sn") String sn);

    BedInformationVO getBedInformationBySn(@Param("sn") String sn);

    /**
     * 查询生命体征阈值表根据设备sn
     *
     * @param sn
     * @return
     */

    @SqlParser(filter = true)
    List<VitalSignsAlarmDto> getVitalSignsAlarmBySn(@Param("sn") String sn, @Param("nowDate") Date nowDate);
}
